import React, {Component} from 'react';
import Items from '../components/Items';
import PublishedPaper from '../components/PublishedPaper';
import Patent from '../components/Patent';
import Software from '../components/Software';

import {Layout} from "antd";

const {Header, Content, Footer} = Layout;

export default class Admin_body extends Component {
    constructor(props) {
        super(props);
        this.state = {
            choose_num: this.props.choose,
            // collapsed: 'menu-unfold',
            choose_arr: [
                <Items />,
                <PublishedPaper />,
                <Patent />,
                <Software />
            ],
        }
    }

    render() {
        return (
            <Layout>
                <Header style={{background: '#fff', padding: 0}}>
                    <div className="head_right">
                        <img src={require("../../img/logo-whut.png")}/>
                    </div>
                </Header>
                <Content style={{margin: '1%', overflow: 'auto',backgroundColor:'white'}}>
                    <div style={{padding: '1%'}}>
                        <div className="choose">
                            {this.state.choose_arr[this.props.choose]}
                        </div>
                    </div>
                </Content>
                <Footer style={{textAlign: 'center', color: 'white', backgroundColor: 'black'}}>
                    SmartLab Design ©2018 Powered By 武汉理工大学智能技术实验室
                </Footer>
            </Layout>
        )
    }
}